
<?php include_once("header.html")?>
<script src="<?php echo $www_site_url?>/public/js/AC_RunActiveContent.js" type="text/javascript"></script>

<div id="wrap">
	<div class="bigpic">
    	<div>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','950','height','245','src','public/images/<?php echo lang('index_flash');?>','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','<?php echo $www_site_url?>/public/images/<?php echo lang('index_flash');?>' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="950" height="245">
        <param name="movie" value="<?php echo $www_site_url?>/public/images/<?php echo lang('index_flash_file');?>" />
            <param name="quality" value="high" />
            <embed src="<?php echo $www_site_url?>/public/images/<?php echo lang('index_flash_file');?>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="950" height="245"></embed>
  	    </object>
    	</noscript>
        </div>
    </div>

    <div class="left" style="width:150px;">
      <table cellspacing="0" cellpadding="0" border="0" width="100%">
        <tbody>
          <tr>
            <td width="4" class="tl4px"></td>
            <td class="tableCenter"><div class="tableTitle"><?php echo lang("clients")?></div></td>
            <td width="4" class="tr4px"></td>
          </tr>
          <tr>
            <td style="border-left: 1px solid rgb(190, 190, 190);">&nbsp;</td>
            <td style="padding: 10px;"><li style="line-height: 23px;" class="shanghu"><a href="/client.php/index"><?php echo lang("about_spot")?></a></li>
                <li style="line-height: 23px;" class="shanghu"><a href="/client.php/index/login"><?php echo lang("client_login")?></a></li></td>
            <td style="border-right: 1px solid rgb(190, 190, 190);">&nbsp;</td>
          </tr>
          <tr>
            <td class="bl4px"></td>
            <td class="bcenter"></td>
            <td class="br4px"></td>
          </tr>
        </tbody>
      </table>
    </div>
<script>
function changeTab(s){

	if(s=='who'){
		$('what_li').className = "";
		$('what').style.display = "none";
		$('why_li').className = "";
		$('why').style.display = "none";
		$('how_li').className = "";
		$('how').style.display = "none";
		$('who_li').className = "on";
		$('who').style.display = "block";
	}
	if(s=='what'){

		$('why_li').className = "";
		$('why').style.display = "none";
		$('who_li').className = "";
		$('who').style.display = "none";
		$('how_li').className = "";
		$('how').style.display = "none";
		$('what_li').className = "on";
		$('what').style.display = "block";
	}
	if(s=='why'){
		$('what_li').className = "";
		$('what').style.display = "none";
		$('how_li').className = "";
		$('how').style.display = "none";
		$('who_li').className = "";
		$('who').style.display = "none";
		$('why_li').className = "on";
		$('why').style.display = "block";
	}
	if(s=='how'){
		$('what_li').className = "";
		$('what').style.display = "none";
		$('why_li').className = "";
		$('why').style.display = "none";
		$('who_li').className = "";
		$('who').style.display = "none";
		$('how_li').className = "on";
		$('how').style.display = "block";
	}
}
</script>
        <div style="padding: 0pt 10px; width: 586px;" class="left">
<div id="tabsD">
  <ul>
    <li id="who_li" class="on"><a title="<?php echo lang("mystery_shopper")?>" href="#" onclick="changeTab('who');return false;"><span><?php echo lang("mystery_shopper")?></span></a></li>
    <li id="what_li"><a title="<?php echo lang("what_do_i_do")?>" href="#" onclick="changeTab('what');return false;"><span><?php echo lang("what_do_i_do")?></span></a></li>
    <li id="why_li"><a title="<?php echo lang("what_can_i_get")?>" href="#" onclick="changeTab('why');return false;"><span><?php echo lang("what_can_i_get")?></span></a></li>
    <li id="how_li"><a title="<?php echo lang("how_do_i_become_one")?>" href="#" onclick="changeTab('how');return false;"><span><?php echo lang("how_do_i_become_one")?> </span></a></li>
  </ul>
</div>
<div id="who" class="clear indexabout">
  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo lang("mystery_shopper_info")?></p>
</div>
<div id="what" class="clear indexabout" style="display:none">
  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo lang("what_do_i_do_info")?> </p>
</div>
<div id="why" class="clear indexabout" style="display:none">
  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo lang("what_can_i_get_info")?>
</p>
</div>
<div id="how" class="clear indexabout" style="display:none">
  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo lang("how_do_i_become_one_info")?>
</p>
</div>

</div>
        <div class="right" style="width:190px;">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="4" class="tl4px"></td>
              <td class="tableCenter"><div class="tableTitle"><?php echo lang("shoppers")?></div></td>
              <td width="4" class="tr4px"></td>
            </tr>
            <tr>
              <td style="border-left:#BEBEBE solid 1px;">&nbsp;</td>
              <td style="padding:10px;"><div id="msg"></div>
                  <form name="loginform" id="loginform" method="post" onsubmit="return checkOnSubmit('loginform', rules);" >
                    <input type="hidden" name="action" value="passport" />
                    <input type="hidden" name="op" value="dologin" />
                    <input type="hidden" name="forward" value="" />
                    <input type="hidden" name="s" id="s" value="" />
                    <div class="hangju"><?php echo lang("user_name")?>：</div>
                    <div class="hangju">
                      <div id="errorsDiv_user"></div>
                      <input name="user" type="text" class="logininput" id="textfield" />
                    </div>
                    <div class="hangju"><?php echo lang("password")?>：</div>
                    <div class="hangju">
                      <div id="errorsDiv_password"></div>
                      <input name="password" type="password" class="logininput" onclick="this.value='';" />
                    </div>
                    <div class="hangju">
                      <input name="imageField" type="submit" id="imageField" value="<?php echo lang("login")?>" class="loginBtn" />
                    <a href="<?php echo $www_site_url?>/index.php/passport/forget"><?php echo lang("lostpassword")?> </a></div>
                  </form></td>
              <td style="border-right:#BEBEBE solid 1px;">&nbsp;</td>
            </tr>
            <tr>
              <td class="bl4px"></td>
              <td class="bcenter"></td>
              <td class="br4px"></td>
            </tr>
          </table>
        </div>

</div>


<SCRIPT>
//only for test purposes
var _key = "<?php echo $_XppassSignKey?>";
//console.log("_key="+_key);
function checkOnSubmit(formName, r) {

    if (yav.performCheck(formName, r, 'inline')) {
    	document.getElementById(formName).password.value = hex_md5(document.getElementById(formName).password.value);
    	document.getElementById(formName).s.value = hex_hmac_md5(_key,document.getElementById(formName).password.value);

    	//console.log("md5str="+hex_hmac_md5(_key,document.getElementById(formName).password.value));

		var url = "<?php echo $www_site_url?>/index.php";
		//var url = "<?php echo $www_site_url?>/index.php/passport/dologin";
		var params = mini.form.serialize($(formName));//将表单中的各项进行序列化

		//alert(params);
		//alert(r);

		mini.ajax.post(url, function(r){
			var r = eval('(' + r + ')');

			if(r.s==200){
			//alert("r.d="+r.d);
				window.location.replace(r.d);
			}
			if(r.s==400){
			//alert("r.m="+r.m);
				if(r.m=='reload') window.location.reload();
				else $('msg').innerHTML = r.m;
			}
		}, params);

    	return false;
    }
    return false;
}
function changeCode() {
	var num = 	new Date().getTime();
	var rand = Math.round(Math.random() * 10000);
	num = num + rand;
	document.getElementById("codeimg").src = "<?php echo $www_site_url?>/index.php/identifycode/generate/" + num;
	return false;
}
var rules=new Array();//定义rules数组

rules[0]='user|required|<?php echo lang('helpmsg1')?>';
rules[1]='password|required|<?php echo lang('helpmsg2')?>';
<?php if($show_code){?>
rules[2]='code|required|<?php echo lang('coderule')?>';
<?php }?>


yav.addHelp('user', '');
yav.addHelp('password', '');
window.onload = function()
                {
                	yav.init('loginform', rules);
                          // Not coming here at all on first shot
                }


</SCRIPT>
<?php include_once("footer.html")?>
